home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11.lha / libX11 / doc / libX11.doc next >
Encoding:
Text File  |  1995-03-23  |  34.4 KB  |  1,345 lines

  1. TABLE OF CONTENTS
  2.  
  3. XOpenDisplay
  4. XCloseDisplay
  5. XCreateSimpleWindow
  6. XCreateWindow
  7. XDestroyWindow
  8. XMapRaised
  9. XMapWindow
  10. XUnmapWindow
  11. XStoreName
  12. XGetWindowAttributes
  13. XConfigureWindow
  14. XCreateGC
  15. XFreeGC
  16. XGetVisualInfo
  17.  
  18. XDrawArc
  19. XDrawArcs
  20. XFillArc
  21. XFillArcs
  22. XDrawPoint
  23. XDrawPoints
  24. XDrawLine
  25. XDrawLines
  26. XDrawRectangle
  27. XDrawRectangles
  28. XFillRectangle
  29. XFillRectangles
  30. XFillPolygon
  31. XDrawString
  32. XClearWindow
  33. XSetForeground
  34. XSetBackground
  35.  
  36. XNextEvent
  37. XPending
  38. XPeekEvent
  39. XSelectInput
  40. XLookupString
  41. XFlush
  42. XQueryPointer
  43.  
  44. XSetClipRectangles
  45. XSetPlaneMask
  46.  
  47. XStoreColor
  48. XStoreColors
  49. XQueryColors
  50. XAllocNamedColor
  51. XAllocColorCells
  52. XParseColor
  53. XCreateColormap
  54. XFreeColormap
  55. XFreeColors
  56. XLookupColor
  57. XAllocColor
  58. XDefaultColormap
  59.  
  60. XCreateImage
  61. XPutImage
  62.  
  63. XCreatePixmap
  64. XFreePixmap
  65.  
  66. XtOpenDisplay
  67. XtCloseDisplay
  68. XtParseTranslationTable
  69. XtAppAddActions
  70. XtAppNextEvent
  71. XtAppAddTimeOut
  72. XtAppMainLoop
  73. XtAppCreateShell
  74. XtAppInitialize
  75.  
  76. XmuGetHostname
  77. X_GETTIMEOFDAY
  78. XBell
  79. XNoOp
  80. gettimeofday
  81.  
  82. XDisplayWidth
  83. XDisplayHeight
  84. XDisplayCells
  85.  
  86. XOpenDisplay
  87.  
  88. NAME
  89.      XOpenDisplay - connect a client program to an X server.
  90.  
  91. Synopsis
  92.      Display *XOpenDisplay(display_name)
  93.          char *display_name;
  94.  
  95. Arguments
  96.      display_name
  97.                Specifies the display name, which determines the  server  to
  98.                connect  to  and  the communications domain to be used.  See
  99.                Description below.
  100.  
  101. Description
  102.   This function opens libraries that are needed for the X11 functions to work.
  103.   It also checks for the os version and what display type is available (PAL/NTSC-
  104.   AGA/ECS). These values are stored in X11 structures:
  105.  
  106. Display amigaX_display;
  107. Screen  amiga_screen;
  108.  
  109.   These structures are accessed through definitions in the includes. Like these
  110.   from X11/Xlib.h:
  111.  
  112. #define DisplayWidth(dpy, scr)     (ScreenOfDisplay(dpy,scr)->width)
  113. #define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
  114.  
  115.   If you specify a public screen as parameter then the programs will open
  116.   windows on this screen unless it is too big for this screen. If the window
  117.   is bigger than the screen, a new screen will be opened that can handle the
  118.   size of the window.
  119.  
  120. XCloseDisplay
  121.  
  122. NAME
  123.      XCloseDisplay - disconnect a client program from an X server and
  124.      display.
  125.  
  126. Synopsis
  127.      XCloseDisplay(display)
  128.          Display *display;
  129.  
  130. Arguments
  131.      display   Specifies  a  connection  to  an  X  server;  returned  from
  132.                XOpenDisplay().
  133.  
  134. Description
  135.   This function closes the libraries opened in XOpenDisplay along with some
  136.   other cleanup operations. Some unix/X11 programs relies on unix to take
  137.   care of all the cleanup of allocated memory, this isn't such a good idea
  138.   under AmigaDos!
  139.  
  140. XCreateSimpleWindow
  141.  
  142. NAME
  143.      XCreateSimpleWindow - create an unmapped InputOutput window.
  144.  
  145. Synopsis
  146.      Window XCreateSimpleWindow(display, parent, x, y, width, height,
  147.      border_width, border, background)
  148.          Display *display;
  149.          Window parent;
  150.          int x, y;
  151.          unsigned int width, height, border_width;
  152.          unsigned long border;
  153.          unsigned long background;
  154.  
  155. Arguments
  156.      display  Specifies a pointer to the Display structure;  returned  from
  157.               XOpenDisplay().
  158.  
  159.      parent   Specifies the parent  window  ID.   Must  be  an  InputOutput
  160.               window.
  161.  
  162.      x
  163.      y
  164.               Specify the x and y coordinates of the  upper-left  pixel  of
  165.               the  new window's border relative to the origin of the parent
  166.               (inside the parent window's border).
  167.  
  168.      width
  169.      height
  170.               Specify the width and height, in pixels, of the  new  window.
  171.               These  are  the  inside  dimensions,  not  including  the new
  172.               window's borders, which are entirely outside of  the  window.
  173.               Must be nonzero.  Any part of the window that extends outside
  174.               its parent window is clipped.
  175.  
  176.      border_width
  177.               Specifies the width, in pixels, of the new window's border.
  178.  
  179.      border   Specifies the pixel value for the border of the window.
  180.  
  181.      background
  182.               Specifies the pixel value for the background of the window.
  183.  
  184. Description
  185.   This function creates an amiga window either on the workbench (or public
  186.   screen) if the requested size is within the size of the workbench or
  187.   on a custom screen if this is not the case.
  188.  
  189. XCreateWindow
  190.  
  191. NAME
  192.      XCreateWindow - create a window and set attributes.
  193.  
  194. Synopsis
  195.      Window XCreateWindow(display, parent, x, y, width, height,
  196.                border_width, depth, class, visual, valuemask,
  197.                attributes)
  198.          Display *display;
  199.          Window parent;
  200.          int x, y;
  201.          unsigned int width, height;
  202.          unsigned int border_width;
  203.          int depth;
  204.          unsigned int class;
  205.          Visual *visual
  206.          unsigned long valuemask;
  207.          XSetWindowAttributes *attributes;
  208.  
  209. Arguments
  210.      display   Specifies  a  connection  to  an  X  server;  returned  from
  211.               XOpenDisplay().
  212.  
  213.      parent   Specifies the parent window.  Parent must be  InputOutput  if
  214.               class of window created is to be InputOutput.
  215.  
  216.      x
  217.      y
  218.               Specify the x and y coordinates of the  upper-left  pixel  of
  219.               the  new window's border relative to the origin of the parent
  220.               (upper left inside the parent's border).
  221.  
  222.      width
  223.      height
  224.               Specify the width and  height,  in  pixels,  of  the  window.
  225.               These   are   the  new  window's  inside  dimensions.   These
  226.               dimensions do not include the new window's borders, which are
  227.               entirely  outside  of the window.  Must be nonzero, otherwise
  228.               the server generates a BadValue error.
  229.  
  230.      border_width
  231.               Specifies the width, in pixels, of the new  window's  border.
  232.               Must  be  0 for InputOnly windows, otherwise a BadMatch error
  233.               is generated.
  234.  
  235.      depth    Specifies the depth of the window,  which  can  be  different
  236.               from the parent's depth.  A depth of CopyFromParent means the
  237.               depth  is  taken  from  the  parent.   Use  XListDepths()  if
  238.               choosing  an  unusual depth.  The specified depth paired with
  239.               the visual argument must be supported on the screen.
  240.  
  241.      class     Specifies  the  new  window's  class.   Pass  one  of  these
  242.               constants: InputOutput, InputOnly, or CopyFromParent.
  243.  
  244.      visual   Specifies a connection to an visual structure describing  the
  245.               style   of   colormap   to   be   used   with   this  window.
  246.               CopyFromParent is valid.
  247.  
  248.      valuemask
  249.               Specifies  which  window  attributes  are  defined   in   the
  250.               attributes  argument.   If  valuemask is 0, attributes is not
  251.               referenced.  This  mask  is  the  bitwise  OR  of  the  valid
  252.               attribute mask bits listed in the Structures section below.
  253.  
  254.      attributes
  255.                Attributes of the window to be set at creation  time  should
  256.                be  set  in  this  structure.  The valuemask should have the
  257.                appropriate bits set to indicate which attributes have  been
  258.                set in the structure.
  259.  
  260. Description
  261.   Currently just calls XCreateSimpleWindow.
  262.  
  263. XDestroyWindow
  264.  
  265. NAME
  266.      XDestroyWindow - unmap and destroy a window and all subwindows.
  267.  
  268. Synopsis
  269.      XDestroyWindow(display, w)
  270.          Display *display;
  271.          Window w;
  272.  
  273. Arguments
  274.      display   Specifies  a  connection  to  an  X  server;  returned  from
  275.                XOpenDisplay().
  276.  
  277.      w         Specifies the ID of the window to be destroyed.
  278.  
  279. Description
  280.   Destroys the window created by XCreateWindow or XCreateSimpleWindow.
  281.  
  282. XMapRaised
  283.  
  284. NAME
  285.      XMapRaised - map a window on top of its siblings.
  286.  
  287. Synopsis
  288.      XMapRaised(display, w)
  289.          Display *display;
  290.          Window w;
  291.  
  292. Arguments
  293.      display   Specifies  a  connection  to  an  X  server;  returned  from
  294.               XOpenDisplay().
  295.  
  296.      w        Specifies the window ID  of  the  window  to  be  mapped  and
  297.               raised.
  298.  
  299. Description
  300.    If the window is a child of another window its borders is drawn. If it is
  301. a root window ActivateWindow is called. WindowToFront should probably be called.
  302.  
  303. XUnmapWindow
  304.  
  305. NAME
  306.      XUnmapWindow - unmap a window.
  307.  
  308. Synopsis
  309.      XUnmapWindow(display, w)
  310.          Display *display;
  311.          Window w;
  312.  
  313. Arguments
  314.      display   Specifies  a  connection  to  an  X  server;  returned  from
  315.                XOpenDisplay().
  316.  
  317.      w         Specifies the window ID.
  318.  
  319. Description
  320.   it the window is a root window it is closed. otherwise nothing is done.
  321. This is slightly asymetric to the way X11 does it since no window is opened
  322. when calling XCreateWindow under X11. It is opened on XMapWindow and closed
  323. on XUnmapWindow.
  324.  
  325. XMapWindow
  326.  
  327. NAME
  328.      XMapWindow - map a window.
  329.  
  330. Synopsis
  331.      XMapWindow(display, w)
  332.          Display *display;
  333.          Window w;
  334.  
  335. Arguments
  336.      display   Specifies  a  connection  to  an  X  server;  returned  from
  337.               XOpenDisplay().
  338.  
  339.      w        Specifies the ID of the window to be mapped.
  340.  
  341. Description
  342.   Nothing happens..
  343.  
  344. XStoreName
  345.  
  346.  NAME
  347.     XStoreName - assign a name to a window.
  348.  
  349.  Synopsis
  350.      XStoreName(display,w,window_name)
  351.        Display *display;
  352.        Window w;
  353.        char *window_name;
  354.  
  355.  Arguments
  356.      display   Specifies  a  connection  to  an  X  server;  returned  from
  357.                XOpenDisplay().
  358.  
  359.      w         Specifies the ID of the window to which  you  want  to  assign  a
  360.                name.
  361.      window_name
  362.                   Specifies the name of the window.  The name  should  be  a  null-
  363.            terminated  string.   If  the  string is not in the Host Portable
  364.                Character Encoding, the result is implementation-dependent.  This
  365.            name is returned by any subsequent call to
  366.  Description
  367.    Set Window name.
  368.  
  369. XGetWindowAttributes
  370.  
  371. NAME
  372.      XGetWindowAttributes - obtain the current attributes of window.
  373.  
  374. Synopsis
  375.      Status XGetWindowAttributes(display, w, window_attributes_return)
  376.          Display *display;
  377.          Window w;
  378.          XWindowAttributes *window_attributes_return;
  379.  
  380. Arguments
  381.      display   Specifies  a  connection  to  an  X  server;  returned  from
  382.               XOpenDisplay().
  383.  
  384.      w        Specifies the window whose current attributes you want.
  385.  
  386.      window_attributes_return
  387.               Returns a filled XWindowAttributes structure, containing  the
  388.               current attributes for the specified window.
  389.  
  390. Description
  391.   returns the window attributes.
  392.  
  393. XConfigureWindow
  394.  
  395. NAME
  396.      XConfigureWindow - change the window position, size, border width, or
  397.      stacking order.
  398.  
  399. Synopsis
  400.      XConfigureWindow(display, w, value_mask, values)
  401.          Display *display;
  402.          Window w;
  403.          unsigned int value_mask;
  404.          XWindowChanges *values;
  405.  
  406. Arguments
  407.      display   Specifies  a  connection  to  an  X  server;  returned  from
  408.                XOpenDisplay().
  409.  
  410.      w         Specifies the ID of the window to be reconfigured.
  411.  
  412.      value_mask
  413.                Specifies which values are to be set  using  information  in
  414.                the  values  structure.  value_mask is the bitwise OR of any
  415.                number of symbols listed in the Structures section below.
  416.  
  417.      values     Specifies  a  pointer  to  the   XWindowChanges   structure
  418.                containing   new   configuration   information.    See   the
  419.                Structures section below.
  420.  
  421. Description
  422.    Sets the window size.
  423.  
  424. XCreateGC
  425.  
  426. NAME
  427.      XCreateGC - create a new graphics context for a given screen with the
  428.      depth of the specified drawable.
  429.  
  430. Synopsis
  431.      GC XCreateGC(display, drawable, valuemask, values)
  432.          Display *display;
  433.          Drawable drawable;
  434.          unsigned long valuemask;
  435.          XGCValues *values;
  436.  
  437. Arguments
  438.      display   Specifies  a  connection  to  an  X  server;  returned  from
  439.                XOpenDisplay().
  440.  
  441.      drawable  Specifies a drawable.  The created GC can only  be  used  to
  442.                draw in drawables of the same depth as this drawable.
  443.  
  444.      valuemask Specifies which members of  the  GC  are  to  be  set  using
  445.                information  in  the values structure.  valuemask is made by
  446.                combining any number of  the  mask  symbols  listed  in  the
  447.                Structures section.
  448.  
  449.      values    Specifies a pointer to an  XGCValues  structure  which  will
  450.                provide components for the new GC.
  451.  
  452. Description
  453.      XCreateGC() creates a new graphics context  resource  in  the  server.
  454.      The  returned  GC can be used in subsequent drawing requests.
  455.  
  456. XFreeGC
  457.  
  458. NAME
  459.      XFreeGC - free a graphics context.
  460.  
  461. Synopsis
  462.      XFreeGC(display, gc)
  463.          Display *display;
  464.          GC gc;
  465.  
  466. Arguments
  467.      display   Specifies  a  connection  to  an  X  server;  returned  from
  468.                XOpenDisplay().
  469.  
  470.      gc        Specifies the graphics context to be freed.
  471.  
  472. Description
  473.      XFreeGC() frees all memory associated with  a  graphics  context,  and
  474.      removes the GC from the server and display hardware.
  475.  
  476. XGetVisualInfo
  477.  
  478. NAME
  479.      XGetVisualInfo - find the visual information structures that match the
  480.      specified template.
  481.  
  482. Synopsis
  483.      XVisualInfo *XGetVisualInfo(display, vinfo_mask,
  484.                vinfo_template, nitems_return)
  485.          Display *display;
  486.          long vinfo_mask;
  487.          XVisualInfo *vinfo_template;
  488.          int *nitems_return;
  489.  
  490. Arguments
  491.      display   Specifies  a  connection  to  an  X  server;  returned  from
  492.                XOpenDisplay().
  493.  
  494.      vinfo_mask
  495.                Specifies the visual mask value.  Indicates  which  elements
  496.                in template are to be matched.
  497.  
  498.      vinfo_template
  499.                Specifies the visual attributes  that  are  to  be  used  in
  500.                matching the visual structures.
  501.  
  502.      nitems_return
  503.                Returns the number of matching visual structures.
  504.  
  505. Description
  506.      XGetVisualInfo() returns a list of  visual  structures  that  describe
  507.      visuals  supported  by  the  server  and  that  match  the  attributes
  508.      specified by the vinfo_template argument.
  509.  
  510.     Currently this is rather simple but it returns values that match the
  511.     Workbench screen.
  512.  
  513. XDrawArc
  514.  
  515. NAME
  516.      XDrawArc - draw an arc fitting inside a rectangle.
  517.  
  518. Synopsis
  519.      XDrawArc(display, drawable, gc, x, y, width, height,
  520.                angle1, angle2)
  521.          Display *display;
  522.          Drawable drawable;
  523.          GC gc;
  524.          int x, y;
  525.          unsigned int width, height;
  526.          int angle1, angle2;
  527.  
  528. Arguments
  529.      display   Specifies  a  connection  to  an  X  server;  returned  from
  530.                XOpenDisplay().
  531.  
  532.      drawable  Specifies the drawable.
  533.  
  534.      gc        Specifies the graphics context.
  535.  
  536.      x
  537.      y
  538.                Specify the x and y coordinates of the upper-left corner  of
  539.                the  rectangle that contains the arc, relative to the origin
  540.                of the specified drawable.
  541.  
  542.      width
  543.      height
  544.                Specify the width and height in  pixels  of  the  major  and
  545.                minor axes of the arc.
  546.  
  547.      angle1    Specifies the start of the arc relative to the three-o'clock
  548.                position  from the center.  Angles are specified in 64ths of
  549.                a degree (360 * 64 is a complete circle).
  550.  
  551.      angle2    Specifies the end of the arc relative to the  start  of  the
  552.                arc.  Angles are specified in 64ths of a degree (360 * 64 is
  553.                a complete circle).
  554.  
  555. Description
  556.   Works!
  557.  
  558. XDrawArcs
  559.  
  560. NAME
  561.      XDrawArcs - draw multiple arcs.
  562.  
  563. Synopsis
  564.      XDrawArcs(display, drawable, gc, arcs, narcs)
  565.          Display *display;
  566.          Drawable drawable;
  567.          GC gc;
  568.          XArc *arcs;
  569.          int narcs;
  570.  
  571. Arguments
  572.      display   Specifies  a  connection  to  an  X  server;  returned  from
  573.                XOpenDisplay().
  574.  
  575.      drawable  Specifies the drawable.
  576.  
  577.      gc        Specifies the graphics context.
  578.  
  579.      arcs      Specifies a pointer to an array of arcs.
  580.  
  581.      narcs     Specifies the number of arcs in the array.
  582.  
  583. Description
  584.   Calls XDrawArc for each arc in the arcs array.
  585.  
  586. XFillArc
  587.  
  588. NAME
  589.      XFillArc - fill an arc.
  590.  
  591. Synopsis
  592.      XFillArc(display, drawable, gc,  x, y, width, height,
  593.                angle1, angle2)
  594.          Display *display;
  595.          Drawable drawable;
  596.          GC gc;
  597.          int x, y;
  598.          unsigned int width, height;
  599.          int angle1, angle2;
  600.  
  601. Arguments
  602.      display   Specifies  a  connection  to  an  X  server;  returned  from
  603.                XOpenDisplay().
  604.  
  605.      drawable  Specifies the drawable.
  606.  
  607.      gc        Specifies the graphics context.
  608.  
  609.      x
  610.      y
  611.                Specify the x and y coordinates of the upper-left corner  of
  612.                the  bounding box containing the arc, relative to the origin
  613.                of the drawable.
  614.  
  615.      width
  616.      height
  617.                Specify the width and height in pixels.  These are the major
  618.                and minor axes of the arc.
  619.  
  620.      angle1    Specifies the start of the arc relative to the three-o'clock
  621.                position  from the center.  Angles are specified in 64ths of
  622.                degrees.
  623.  
  624.      angle2    Specifies the path and extent of the  arc  relative  to  the
  625.                start of the arc.  Angles are specified in 64ths of degrees.
  626.  
  627. Description
  628.   Works!
  629.  
  630. XFillArcs
  631.  
  632. NAME
  633.      XFillArcs - fill multiple arcs.
  634.  
  635. Synopsis
  636.      XFillArcs(display, drawable, gc, arcs, narcs)
  637.          Display *display;
  638.          Drawable drawable;
  639.          GC gc;
  640.          XArc *arcs;
  641.          int narcs;
  642.  
  643. Arguments
  644.      display   Specifies  a  connection  to  an  X  server;  returned  from
  645.               XOpenDisplay().
  646.  
  647.      drawable Specifies the drawable.
  648.  
  649.      gc       Specifies the graphics context.
  650.  
  651.      arcs     Specifies a pointer to an array of arc definitions.
  652.  
  653.      narcs    Specifies the number of arcs in the array.
  654.  
  655. Description
  656.   Calls XFillArc for each arc in the arcs array.
  657.  
  658. XDrawPoint
  659.  
  660. NAME
  661.      XDrawPoint - draw a point.
  662.  
  663. Synopsis
  664.      XDrawPoint(display, drawable, gc, x, y)
  665.          Display *display;
  666.          Drawable drawable;
  667.          GC gc;
  668.          int x, y;
  669.  
  670. Arguments
  671.      display   Specifies  a  connection  to  an  X  server;  returned  from
  672.                XOpenDisplay().
  673.  
  674.      drawable  Specifies the drawable.
  675.  
  676.      gc        Specifies the graphics context.
  677.  
  678.      x
  679.      y
  680.                Specify the x and y coordinates of the  point,  relative  to
  681.                the origin of the drawable.
  682.  
  683. Description
  684.   Draws a point!
  685.  
  686. XDrawPoints
  687.  
  688. NAME
  689.      XDrawPoints - draw multiple points.
  690.  
  691. Synopsis
  692.      XDrawPoints(display, drawable, gc, points, npoints, mode)
  693.          Display *display;
  694.          Drawable drawable;
  695.          GC gc;
  696.          XPoint *points;
  697.          int npoints;
  698.          int mode;
  699.  
  700. Arguments
  701.      display   Specifies  a  connection  to  an  X  server;  returned  from
  702.                XOpenDisplay().
  703.  
  704.      drawable  Specifies the drawable.
  705.  
  706.      gc        Specifies the graphics context.
  707.  
  708.      points    Specifies  a  pointer  to  an  array  of  XPoint  structures
  709.                containing the positions of the points.
  710.  
  711.      npoints   Specifies the number of points to be drawn.
  712.  
  713.      mode      Specifies the coordinate mode.  CoordModeOrigin  treats  all
  714.                coordinates    as    relative    to    the   origin,   while
  715.                CoordModePrevious treats all coordinates after the first  as
  716.                relative  to  the  previous  point, while the first is still
  717.                relative to the origin.
  718.  
  719. Description
  720.   Calls XDrawPoint for each point in the points array.
  721.  
  722. XDrawLine
  723.  
  724. NAME
  725.      XDrawLine - draw a line between two points.
  726.  
  727. Synopsis
  728.      XDrawLine(display, drawable, gc, x1, y1, x2, y2)
  729.          Display *display;
  730.          Drawable drawable;
  731.          GC gc;
  732.          int x1, y1, x2, y2;
  733.  
  734. Arguments
  735.      display   Specifies  a  connection  to  an  X  server;  returned  from
  736.                XOpenDisplay().
  737.  
  738.      drawable  Specifies the drawable.
  739.  
  740.      gc        Specifies the graphics context.
  741.  
  742.      x1
  743.      y1
  744.      x2
  745.      y2
  746.                Specify  the  coordinates  of  the  endpoints  of  the  line
  747.                relative to the drawable origin.  XDrawLine() connects point
  748.                (x1,y1) to point (x2,y2).
  749.  
  750. Description
  751.   Works!
  752.  
  753. XDrawLines
  754.  
  755. NAME
  756.      XDrawLines - draw multiple connected lines.
  757.  
  758. Synopsis
  759.      XDrawLines(display, drawable, gc, points, npoints, mode)
  760.          Display *display;
  761.          Drawable drawable;
  762.          GC gc;
  763.          XPoint *points;
  764.          int npoints;
  765.          int mode;
  766.  
  767. Arguments
  768.      display   Specifies  a  connection  to  an  X  server;  returned  from
  769.                XOpenDisplay().
  770.  
  771.      drawable  Specifies the drawable.
  772.  
  773.      gc        Specifies the graphics context.
  774.  
  775.      points    Specifies a pointer to an array of points.
  776.  
  777.      npoints   Specifies the number of points in the array.
  778.  
  779.      mode      Specifies the coordinate mode. Pass  either  CoordModeOrigin
  780.                or CoordModePrevious.
  781.  
  782. Description
  783.   Calls XDrawLine for each line described by the points array.
  784.  
  785. XDrawRectangle
  786.  
  787. NAME
  788.      XDrawRectangle - draw an outline of a rectangle.
  789.  
  790. Synopsis
  791.      XDrawRectangle(display, drawable, gc, x, y, width, height)
  792.          Display *display;
  793.          Drawable drawable;
  794.          GC gc;
  795.          int x, y;
  796.          unsigned int width, height;
  797.  
  798. Arguments
  799.      display   Specifies  a  connection  to  an  X  server;  returned  from
  800.                XOpenDisplay().
  801.  
  802.      drawable  Specifies the drawable.
  803.  
  804.      gc        Specifies the graphics context.
  805.  
  806.      x
  807.      y
  808.                Specify the x and y coordinates of the upper-left corner  of
  809.                the rectangle, relative to the drawable's origin.
  810.  
  811.      width
  812.      height
  813.                Specify the width and height in  pixels.   These  dimensions
  814.                define the outline of the rectangle.
  815.  
  816. Description
  817.   ok.
  818.  
  819. XDrawRectangles
  820.  
  821. NAME
  822.      XDrawRectangles - draw the outlines of multiple rectangles.
  823.  
  824. Synopsis
  825.      XDrawRectangles(display, drawable, gc, rectangles, nrectangles)
  826.          Display *display;
  827.          Drawable drawable;
  828.          GC gc;
  829.          XRectangle rectangles[];
  830.          int nrectangles;
  831.  
  832. Arguments
  833.      display   Specifies a connection to an X server; returned from
  834.                XOpenDisplay().
  835.  
  836.      drawable  Specifies the drawable.
  837.  
  838.      gc        Specifies the graphics context.
  839.  
  840.      rectangles
  841.                Specifies a pointer to an array of rectangles containing
  842.                position and size information.
  843.  
  844.      nrectangles
  845.                Specifies the number of rectangles in the array.
  846.  
  847. Description
  848.   ok.
  849.  
  850. XFillRectangle
  851.  
  852. NAME
  853.      XFillRectangle - fill a rectangular area.
  854.  
  855. Synopsis
  856.      XFillRectangle(display, drawable, gc, x, y, width, height)
  857.          Display *display;
  858.          Drawable drawable;
  859.          GC gc;
  860.          int x, y;
  861.          unsigned int width, height;
  862.  
  863. Arguments
  864.      display   Specifies  a  connection  to  an  X  server;  returned  from
  865.               XOpenDisplay().
  866.  
  867.      drawable Specifies the drawable.
  868.  
  869.      gc       Specifies the graphics context.
  870.  
  871.      x
  872.      y
  873.               Specify the x and y coordinates of the upper-left  corner  of
  874.               the rectangle, relative to the origin of the drawable.
  875.  
  876.      width
  877.      height
  878.               Specify the dimensions in  pixels  of  the  rectangle  to  be
  879.               filled.
  880.  
  881. Description
  882.   ok!
  883.  
  884. XFillRectangles
  885.  
  886. NAME
  887.      XFillRectangles - fill multiple rectangular areas.
  888.  
  889. Synopsis
  890.      XFillRectangles(display, drawable, gc, rectangles, nrectangles)
  891.          Display *display;
  892.          Drawable drawable;
  893.          GC gc;
  894.          XRectangle *rectangles;
  895.          int nrectangles;
  896.  
  897. Arguments
  898.      display   Specifies a connection to an X server; returned from
  899.                XOpenDisplay().
  900.  
  901.      drawable  Specifies the drawable.
  902.  
  903.      gc        Specifies the graphics context.
  904.  
  905.      rectangles
  906.                Specifies a pointer to an array of rectangles.
  907.  
  908.      nrectangles
  909.                Specifies the number of rectangles in the array.
  910.  
  911. Description
  912.   ok!
  913.  
  914. XFillPolygon
  915.  
  916. NAME
  917.      XFillPolygon - fill a polygon.
  918.  
  919. Synopsis
  920.      XFillPolygon(display, drawable, gc, points, npoints, shape, mode)
  921.          Display *display;
  922.          Drawable drawable;
  923.          GC gc;
  924.          XPoint *points;
  925.          int npoints;
  926.          int shape;
  927.          int mode;
  928.  
  929. Arguments
  930.      display   Specifies a connection to an X server; returned from
  931.                XOpenDisplay().
  932.  
  933.      drawable  Specifies the drawable.
  934.  
  935.      gc        Specifies the graphics context.
  936.  
  937.      points    Specifies a pointer to an array of points.
  938.  
  939.      npoints   Specifies the number of points in the array.
  940.  
  941.      shape     Specifies an argument that helps the server to improve
  942.                performance.  Pass the last constant in this list that is
  943.                valid for the polygon to be filled: Complex, Nonconvex, or
  944.                Convex.
  945.  
  946.      mode      Specifies the coordinate mode. Pass either CoordModeOrigin
  947.                or CoordModePrevious.
  948.  
  949. Description
  950.   ok!
  951.  
  952. XDrawString
  953.  
  954. NAME
  955.      XDrawString - draw an 8-bit text string, foreground only.
  956.  
  957. Synopsis
  958.      XDrawString(display, drawable, gc, x, y, string, length)
  959.          Display *display;
  960.          Drawable drawable;
  961.          GC gc;
  962.          int x, y;
  963.          char *string;
  964.          int length;
  965.  
  966. Arguments
  967.      display   Specifies  a  connection  to  an  X  server;  returned  from
  968.                XOpenDisplay().
  969.  
  970.      drawable  Specifies the drawable.
  971.  
  972.      gc        Specifies the graphics context.
  973.  
  974.      x
  975.      y
  976.                Specify the x and y coordinates  of  the  baseline  starting
  977.                position  for  the  character, relative to the origin of the
  978.                specified drawable.
  979.  
  980.      string    Specifies the character string.
  981.  
  982.      length    Specifies the number of characters in string.
  983.  
  984. Description
  985.   Fairly simple at the moment, no font mapping is done.
  986.  
  987. XClearWindow
  988.  
  989. NAME
  990.      XClearWindow - clear an entire window.
  991.  
  992. Synopsis
  993.      XClearWindow(display, w)
  994.          Display *display;
  995.          Window w;
  996.  
  997. Arguments
  998.      display   Specifies  a  connection  to  an  X  server;  returned  from
  999.                XOpenDisplay().
  1000.  
  1001.      w         Specifies the ID of the window to be cleared.
  1002.  
  1003. Description
  1004.   ok!
  1005.  
  1006. XSetForeground
  1007.  
  1008. NAME
  1009.      XSetForeground - set the foreground pixel value in a graphics context.
  1010.  
  1011. Synopsis
  1012.      XSetForeground(display, gc, foreground)
  1013.          Display *display;
  1014.          GC gc;
  1015.          unsigned long foreground;
  1016.  
  1017. Arguments
  1018.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1019.                XOpenDisplay().
  1020.  
  1021.      gc        Specifies the graphics context.
  1022.  
  1023.      foreground
  1024.                Specifies the  foreground  pixel  value  you  want  for  the
  1025.                specified graphics context.
  1026.  
  1027. Description
  1028.   ok.
  1029.  
  1030. XSetBackground
  1031.  
  1032. NAME
  1033.      XSetBackground - set the background pixel value in a graphics context.
  1034.  
  1035. Synopsis
  1036.      XSetBackground(display, gc, background)
  1037.          Display *display;
  1038.          GC gc;
  1039.          unsigned long background;
  1040.  
  1041. Arguments
  1042.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1043.                XOpenDisplay().
  1044.  
  1045.      gc        Specifies the graphics context.
  1046.  
  1047.      background
  1048.                Specifies the background component of the GC.
  1049.  
  1050. Description
  1051.   ok.
  1052.  
  1053. XNextEvent
  1054.  
  1055. NAME
  1056.      XNextEvent - get the next event of any type or window.
  1057.  
  1058. Synopsis
  1059.      XNextEvent(display, event_return)
  1060.          Display *display;
  1061.          XEvent *event_return;
  1062.  
  1063. Arguments
  1064.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1065.                XOpenDisplay().
  1066.  
  1067.      event_return
  1068.                Returns the event removed from the event queue.
  1069.  
  1070. Description
  1071.   Fairly simple but seems to work ok.
  1072.  
  1073. XPending
  1074.  
  1075. NAME
  1076.      XPending - return the number of pending events.
  1077.  
  1078. Synopsis
  1079.      int XPending(display)
  1080.          Display *display;
  1081.  
  1082. Arguments
  1083.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1084.                XOpenDisplay().
  1085.  
  1086. Description
  1087.   Returns 1 if there is any IntuiMessage waiting. 0 otherwise.
  1088.  
  1089. XPeekEvent
  1090.  
  1091. NAME
  1092.      XPeekEvent - get an event without removing it from the queue.
  1093.  
  1094. Synopsis
  1095.      XPeekEvent(display, event_return)
  1096.          Display *display;
  1097.          XEvent *event_return;
  1098.  
  1099. Arguments
  1100.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1101.                XOpenDisplay().
  1102.  
  1103.      report_return
  1104.                Returns the event peeked from the input queue.
  1105.  
  1106. Description
  1107.   Returns one IntuiMessage, but doesn't delete it.
  1108.  
  1109. XSelectInput
  1110.  
  1111. NAME
  1112.      XSelectInput - select the event types to be sent to a window.
  1113.  
  1114. Synopsis
  1115.      XSelectInput(display, w, event_mask)
  1116.          Display *display;
  1117.          Window w;
  1118.          long event_mask;
  1119.  
  1120. Arguments
  1121.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1122.                XOpenDisplay().
  1123.  
  1124.      w         Specifies the ID of the window interested in the events.
  1125.  
  1126.      event_mask
  1127.                Specifies the event mask.  This mask is the  bitwise  OR  of
  1128.                one or more of the valid event mask bits (see below).
  1129.  
  1130. Description
  1131.    Amazingly simple at the moment!
  1132.  
  1133. XLookupString
  1134.  
  1135. NAME
  1136.      XLookupString - map a key event to ASCII string, keysym, and
  1137.      ComposeStatus.
  1138.  
  1139. Synopsis
  1140.      int XLookupString(event_structure, buffer_return, bytes_buffer,
  1141.      keysym_return, status_in_out)
  1142.          XKeyEvent *event_structure;
  1143.          char *buffer_return;
  1144.          int bytes_buffer;
  1145.          KeySym *keysym_return;
  1146.          XComposeStatus *status_in_out;/* may not be implemented */
  1147.  
  1148. Arguments
  1149.      event_structure
  1150.                Specifies the key event to be used.
  1151.  
  1152.      buffer_return
  1153.                Returns  the  resulting  string   (not   NULL   terminated).
  1154.                Returned value of the function is the length of the string.
  1155.  
  1156.      bytes_buffer
  1157.                Specifies  the  length  of  the  buffer.    No   more   than
  1158.                bytes_buffer of translation are returned.
  1159.  
  1160.      keysym_return
  1161.                If this argument is not NULL, it  specifies  the  keysym  ID
  1162.                computed from the event.
  1163.  
  1164.      status_in_out
  1165.                Specifies the XComposeStatus structure that contains compose
  1166.                key  state  information  and  that  allows  the  compose key
  1167.                processing to take place.  This can be NULL if the caller is
  1168.                not   interested  in  seeing  compose  key  sequences.   Not
  1169.                implemented in X Consortium Xlib through Release 5.
  1170.  
  1171. Description
  1172.   Returns the last pressed key.
  1173.  
  1174. XFlush
  1175.  
  1176. NAME
  1177.      XFlush - send all queued requests to the server.
  1178.  
  1179. Synopsis
  1180.      XFlush(display)
  1181.          Display *display;
  1182.  
  1183. Arguments
  1184.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1185.                XOpenDisplay().
  1186.  
  1187. Description
  1188.   Calls ReplyMsg until no IntuiMessage is waiting.
  1189.  
  1190. XQueryPointer
  1191.  
  1192. NAME
  1193.      XQueryPointer - get the current pointer location.
  1194.  
  1195. Synopsis
  1196.      Bool XQueryPointer(display, w, root_return, child_return,
  1197.      root_x_return, route_y_return,
  1198.                win_x_return, win_y_return, mask_return)
  1199.          Display *display;
  1200.          Window w;
  1201.          Window *root_return, *child_return;
  1202.          int *root_x_return, *route_y_return;
  1203.          int *win_x_return, *win_y_return;
  1204.          unsigned int *mask_return;
  1205.  
  1206. Arguments
  1207.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1208.               XOpenDisplay().
  1209.  
  1210.      w        Specifies a window which indicates which screen  the  pointer
  1211.               position is returned for, and child_return will be a child of
  1212.               this window if pointer is inside a child.
  1213.  
  1214.      root_return
  1215.               Returns the root window ID the pointer is currently on.
  1216.  
  1217.      child_return
  1218.               Returns the ID of the child of w the pointer is  located  in,
  1219.               or zero if it not in a child.
  1220.  
  1221.      root_x_return
  1222.      route_y_return
  1223.               Return the x and y coordinates of the pointer relative to the
  1224.               root's origin.
  1225.  
  1226.      win_x_return
  1227.      win_y_return
  1228.               Return the x and y coordinates of the pointer relative to the
  1229.               origin of window w.
  1230.  
  1231.      mask_return
  1232.               Returns the current state of the modifier  keys  and  pointer
  1233.               buttons.   This is a mask composed of the OR of any number of
  1234.               the  following  symbols:  ShiftMask,  LockMask,  ControlMask,
  1235.               Mod1Mask,  Mod2Mask,  Mod3Mask,  Mod4Mask, Mod5Mask, Button1-
  1236.               Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask.
  1237.  
  1238. Description
  1239.   returns current pointer position and buttonvalues.
  1240.  
  1241. XBell
  1242.  
  1243. NAME
  1244.      XBell - ring the bell (Control G).
  1245.  
  1246. Synopsis
  1247.      XBell(display, percent)
  1248.          Display *display;
  1249.          int percent;
  1250.  
  1251. Arguments
  1252.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1253.               XOpenDisplay().
  1254.  
  1255.      percent  Specifies the volume for  the  bell,  relative  to  the  base
  1256.               volume  set  with  XChangeKeyboardControl().  Possible values
  1257.               are  - 100 (off), through 0 (base volume), to  100  (loudest)
  1258.               inclusive.
  1259.  
  1260. Description
  1261.   printf("%c",7);
  1262.  
  1263. XNoOp
  1264.  
  1265. NAME
  1266.      XNoOp - send a NoOp to exercise connection with the server.
  1267.  
  1268. Synopsis
  1269.      XNoOp(display)
  1270.          Display *display;
  1271.  
  1272. Arguments
  1273.      display   Specifies  a  connection  to  an  X  server;  returned  from
  1274.                XOpenDisplay().
  1275.  
  1276. Description
  1277.   Doesn't do anything!
  1278.  
  1279. XDisplayWidth
  1280.  
  1281. NAME
  1282.      XDisplayWidth - query width of screen in pixels.
  1283.  
  1284. Synopsis
  1285.      int XDisplayWidth(display, screen_number)
  1286.               Display *display;
  1287.               int screen_number;
  1288.      int XDisplayWidthMM(display, screen_number)
  1289.               Display *display;
  1290.               int screen_number;
  1291.  
  1292. Arguments
  1293.      display   Specifies a connection to an X server; returned from
  1294.                XOpenDisplay().
  1295.  
  1296.      screen_number
  1297.                Specifies the appropriate screen number on the server.
  1298.  
  1299. Description
  1300.   Returns the screen's width, probably the workbench screen unless a public screen
  1301.   has been opened.
  1302.  
  1303. XDisplayHeight
  1304.  
  1305. NAME
  1306.      XDisplayHeight - query height of screen in pixels.
  1307.  
  1308. Synopsis
  1309.      int XDisplayHeight(display, screen_number)
  1310.               Display *display;
  1311.               int screen_number;
  1312.  
  1313. Arguments
  1314.      display   Specifies a connection to an X server; returned from
  1315.                XOpenDisplay().
  1316.  
  1317.      screen_number
  1318.                Specifies the appropriate screen number on the server.
  1319.  
  1320. Description
  1321.   Returns the screen's height, probably the workbench screen unless a public screen
  1322.   has been opened.
  1323.  
  1324. XDisplayCells
  1325.  
  1326. NAME
  1327.      XDisplayCells, DisplayCells - query number of cells in default
  1328.      colormap of screen.
  1329.  
  1330. Synopsis
  1331.      int XDisplayCells(display, screen_number)
  1332.               Display *display;
  1333.               int screen_number;
  1334.  
  1335. Arguments
  1336.      display   Specifies a connection to an X server; returned from
  1337.                XOpenDisplay().
  1338.  
  1339.      screen_number
  1340.                Specifies the appropriate screen number on the host server.
  1341.  
  1342. Description
  1343.   Returns the screen's depth, probably the workbench screen unless a public screen
  1344.   has been opened.
  1345.